#ifndef BACKGROUNDLOADER_H
#define BACKGROUNDLOADER_H

#include <QObject>
#include <QImage>
#include <QThreadPool>
#include <QRunnable>
#include <QString>

class BackgroundLoader : public QObject {
    Q_OBJECT
public:
    explicit BackgroundLoader(QObject* parent = nullptr);

    void submitOriginal(const QString& fileIdentity, int pageIndex, int dpiBucket, int priority);

signals:
    void originalReady(const QString& fileIdentity, int pageIndex, int dpiBucket, const QImage& img);

private:
    QThreadPool pool_;
};

#endif // BACKGROUNDLOADER_H


